from typing import List


class Solution:
    def canMakeSquare(self, grid: List[List[str]]) -> bool:
        for i in range(len(grid) - 1):
            for j in range(len(grid[0]) - 1):
                count = 0
                if grid[i][j] == 'B':
                    count += 1
                if grid[i + 1][j] == 'B':
                    count += 1
                if grid[i][j + 1] == 'B':
                    count += 1
                if grid[i + 1][j + 1] == 'B':
                    count += 1
                if count != 2:
                    return True
        return False


if __name__ == '__main__':
    nums = [["B", "W", "B"], ["W", "B", "W"], ["B", "W", "B"]]
    s = Solution()

    print(s.canMakeSquare(nums))
